package com.rjxy.plansystemmanagement.service.impl;

import com.rjxy.plansystemmanagement.entity.yh.YhCode;
import com.rjxy.plansystemmanagement.entity.yh.YhCoupon;
import com.rjxy.plansystemmanagement.entity.yh.YhUser;
import com.rjxy.plansystemmanagement.mapper.YhMapper;
import com.rjxy.plansystemmanagement.service.YhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class YhServiceImpl implements YhService {
    @Autowired
    private YhMapper yhMapper;
    @Override
    public List<YhCoupon> getIssuedCoupon() {
        return yhMapper.getIssuedCoupon();
    }

    @Override
    public void addYhUser(YhUser yhUser) {
        yhMapper.addYhUser(yhUser);
    }

    @Override
    public List<YhCoupon> getCouponByUid(Integer id) {
        return yhMapper.getCouponByUid(id);
    }

    @Override
    public YhCode selectCode(String code) {
        return yhMapper.selectCode(code);
    }

    @Override
    public void updateYhCode(YhCode yhCode) {
        yhMapper.updateYhCode(yhCode);
    }

    @Override
    public List<YhUser> getYhUserByStatus(Integer status) {
        return yhMapper.getYhUserByStatus(status);
    }

    @Override
    public List<YhCoupon> getCouponsByCouponId(Integer id) {
        return yhMapper.getCouponsByCouponId(id);
    }

    @Override
    public void updateYhUser(YhUser yhUser) {
        yhMapper.updateYhUser(yhUser);
    }
}
